#ifndef MULTISELECTDLG_H
#define MULTISELECTDLG_H

#include <wx/intl.h>
#include <wx/string.h>
#include <wx/dynarray.h>
#include "scrollingdialog.h"

class MultiSelectDlg : public wxScrollingDialog {
  public:
    MultiSelectDlg( wxWindow* parent, const wxArrayString& items, const wxString& wildcard,
                    const wxString& label = _T( "选择项:" ),
                    const wxString& title = _T( "多选" ) );
    MultiSelectDlg( wxWindow* parent, const wxArrayString& items, bool selectall = false,
                    const wxString& label = _T( "选择项:" ),
                    const wxString& title = _T( "多选" ) );
    virtual ~MultiSelectDlg();
    wxArrayString GetSelectedStrings() const;
    wxArrayInt GetSelectedIndices() const;
    void SelectWildCard( const wxString& wild, bool select = true, bool clearOld = false );
  protected:
    void Init( const wxArrayString& items, const wxString& wildcard );
    void UpdateStatus();
    void OnWildcard( wxCommandEvent& event );
    void OnToggle( wxCommandEvent& event );
    void OnSelectAll( wxCommandEvent& event );
    void OnDeselectAll( wxCommandEvent& event );
    void OnItemToggle( wxCommandEvent& event );
  private:
    bool xml_File_lock;
    DECLARE_EVENT_TABLE();
};

#endif
